package de.jmda.gen.java.naming;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotation providing information for building target package names. This
 * information can be evaluated by e. g. {@link TargetPackageNameBuilder}.
 * <p>
 * If this annotation is applied to a type it is supposed that the type
 * annotation overrides a possibly present <code>TargetPackageNamingInfo</code>
 * annotation of the respective package.
 * 
 *
 */
@Retention(RetentionPolicy.SOURCE)
@Target({ElementType.PACKAGE, ElementType.TYPE})
public @interface TargetPackageNamingInfo
{
	/**
	 * @return enum value that specifies the naming strategy for the annotated
	 *         package
	 */
	TargetPackageNamingStrategy packageNamingStrategy()
			default TargetPackageNamingStrategy.SUFFIX_APPEND_DEFAULT;
	
	/**
	 * @return information that depending on {@link #packageNamingStrategy()} may
	 *         be necessary to compute a target package name
	 *         <p>
	 *         Depending on {@link #packageNamingStrategy()} this information is
	 *         supposed to be necessary in the following cases:
	 *         <ul>
	 *           <li>{@link TargetPackageNamingStrategy#SUFFIX_APPEND_SPECIFIED}
	 *           <li>{@link TargetPackageNamingStrategy#SUFFIX_REPLACE_SPECIFIED}
	 *           <li>{@link TargetPackageNamingStrategy#QUALIFIED}
	 *         </ul>
	 *         <p>
	 *         Otherwise the information is supposed to be ignored.
	 */
	String packageNamingStrategyInfo() default "";
}